package com.glela.common.beans.error;

/**
 * 错误Bean
 * 
 * @author liujie
 */
public class ErrorBean
{
	//错误代码——字段为空
	public static final String IS_NULL = "0001";
	//错误代码——数字格式错误
	public static final String NUM_FORMAT = "0002";
	//错误代码——日期格式错误
	public static final String DATE_FORMATE = "0003";
	//错误代码——日期逻辑错误
	public static final String DATE_LOGIC = "0004";
	//错误代码——长度超出限制错误
	public static final String STRING_LENGTH = "0005";
	//错误代码——时间逻辑错误
	public static final String TIME_LOGIC = "0006";
	//错误代码——值不相等错误
	public static final String STRING_EQUALS = "0007";
	//错误代码——数据库中查无记录错误
	public static final String DB_OBJECT_NULL = "0008";
	//错误代码——不符合正则表达式错误
	public static final String REGEXP_MATCHER = "0009";
	//错误代码——数据库中数据不唯一（既已存在）错误
	public static final String DB_NONUNIQUENESS = "0010";
	//错误代码——库存不足错误
	public static final String STOCKNUM_BEYOND_LIMIT = "0011";
	//错误代码——重复提交
	public static final String NOT_REPEAT_COMMINT = "0012";
	//错误代码——点币不足错误
	public static final String COINS_BEYOND_LIMIT = "0013";
	//错误代码——其他
	public static final String OTHER = "9999";

	/**
	 * 错误代码
	 */
	private String code;
	/**
	 * 出错字段
	 */
	private String culumn;
	/**
	 * 错误信息
	 */
	private String msg;

	public ErrorBean()
	{

	}

	public ErrorBean(String code, String msg)
	{
		this.code = code;
		this.msg = msg;
	}

	public ErrorBean(String code, String culumn, String msg)
	{
		this.code = code;
		this.culumn = culumn;
		this.msg = msg;

	}

	/**
	 * @return the code
	 */
	public String getCode()
	{
		return code;
	}

	/**
	 * @return the culumn
	 */
	public String getCulumn()
	{
		return culumn;
	}

	/**
	 * @return the msg
	 */
	public String getMsg()
	{
		return msg;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code)
	{
		this.code = code;
	}

	/**
	 * @param culumn
	 *            the culumn to set
	 */
	public void setCulumn(String culumn)
	{
		this.culumn = culumn;
	}

	/**
	 * @param msg
	 *            the msg to set
	 */
	public void setMsg(String msg)
	{
		this.msg = msg;
	}

}
